﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Demo.Framework.AccessModifier
{
    class TestClass
    {
        public TestClass()
        {
            var c1 = new InternalClass();
            var c2 = new PublicClass();
            
            c1.ProtectedInternalMethod();
            c1.PublicMethod();
            c1.InternalMethod();

            c2.ProtectedInternalMethod();
            c2.PublicMethod();
            c2.InternalMethod();

        }
        
    }

    class InheritedClass : InternalClass
    {
        public InheritedClass()
        {
            var c1 = new InternalClass();
            var c2 = new PublicClass();
            
            c1.ProtectedInternalMethod();
            c1.PublicMethod();
            c1.InternalMethod();

            c2.ProtectedInternalMethod();
            c2.PublicMethod();
            c2.InternalMethod();
                        
            this.ProtectedMethod();            
        }
    }
}
